
package com.be.beadmin.design.service;

import com.be.beadmin.common.entity.PageEntity;
import com.be.beadmin.design.dto.input.StandProductDto;
import com.be.beadmin.design.dto.output.StandProductEx;
import com.be.beadmin.design.entity.StandProduct;
import io.swagger.annotations.ApiParam;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.HashMap;
import java.util.List;

/**
* @description 服务接口
* @author Jiahao Liu
* @date 2023-02-13
**/
public interface StandProductService {

    /**
    * 分页的查询接口
    * @param pageEntity
    * @return
    */
    Page<StandProductEx> getStandProductByPage(PageEntity pageEntity);

    /**
    *
    */
    StandProduct addStandProduct(StandProductDto standProductDto);
    StandProduct addStandProduct2(String standTypeDesc, String standTypeName,String bopCode, String standDesignWorkHour, String standManufactWorkHour, String memo,String bucketName,String materialInfoId,    String materialCode,String materialName) throws Exception;

    /**
    * @param standProductDto
    */
    void updateStandProduct(StandProductDto standProductDto);

    void updateStandProduct2(String standTypeId,String standTypeDesc, String standTypeCode, String standTypeName,String bopCode, String standDesignWorkHour, String standManufactWorkHour, String memo, String bucketName,String materialInfoId,String materialCode,String materialName) throws Exception;

    /**
    * @param id
    */
    void delStandProduct(String id);

    /**
    * 删除多个角色
    * @param ids
    */
    void delStandProducts (List<String> ids);

    /**
     * 获取柜体类型
     * @param
     */
    List<String> getProductType();


    /**
     * 获取所有的柜体编码
     * @return
     */
    List<String> getStandProductCode();

    /**
     * 获取标准柜体类型及编码信息
     * @return
     */
    HashMap<String,List<String>> getStandProductAndType();

    /**
     * 获取标准柜体编码和名称信息
     */
    HashMap<String, List> getStandProductCodeAndName();
    /**
     * 获取标准柜体类型及编码信息
     * @return
     */
    StandProduct getStandProductByCode(String code);

    /**
     * 获取标准柜体类型及编码信息
     * @return
     */
    HashMap<String, String> getNoStandProductCode();

    List<String> getDrawingTypeList();

    public List<String> getDrawingTypeListSorted();

    StandProduct getStandProductByStandTypeName(String standTypeName);

    /**
     * 标准柜体，需要校验是否有BOM、图纸、工时，
     * @param standProductCode
     * @return
     */
    void checkStandProduct(String standProductCode);

    List<String>  submitStandProduct(String standTypeId);

    void approveStandProduct(String standTypeId, Integer state, String approveText);
}